import React from 'react';
import './index.less';

import {render, connect} from 'src/hrpub/common/frame';


import FormAction from './actions/index';
import {COMMON} from "../../main/util";
import DetailAction from "../../actions/detail";
import ButtonAction from '../../actions/btn';

const Wrapper = render({
    actions: {
        formAct: FormAction,
        detailAct: DetailAction,
        btnAct: ButtonAction
    }
})(({props, state, action}) => {

    const {form,transfer} = props;
    const {createForm} = form;

    return (
        <div className="page-detail">
            {createForm(COMMON.formId,{
                onBeforeEvent: action.formAct.onBeforeEvent,
                onAfterEvent: action.formAct.onAfterEvent,
                expandArr: ["psninfo", "oldinfo", "newinfo", "stapply_mng_org", "contract_mng_org", "execinfo", "table_end_info", 'audit_info']
            })}
        </div>
    );

});


export default connect(Wrapper);